package gradle.common.core.mode.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import gradle.common.core.annotation.SnowflakeId;
import gradle.common.core.enums.DataStatusEnum;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * base modle
 */
@Data
public class BaseModel {

    /**
     * 唯一IDSystemUser
     */
    @SnowflakeId
    private Long id;

    /**
     * 状态(1=启用，0=禁用)
     */
    private Integer status = DataStatusEnum.VALID.getStatus();

    /**
     * 创建人ID
     */
    private Long createUser;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime = LocalDateTime.now();

    /**
     * 更新人ID
     */
    private Long updateUser;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

}
